package models.System.SQL;

/**
 * Created by Administrator on 2018-06-22.
 */
public class SQL {
    /**
     * 查询通用符号
     */
    public static final String SELECT ="SELECT";
    /**
     * 查看用户信息权限
     */
    public static final String USERROTEMEUN=" systemmeun.MenuName,systemmeun.MeunId,systemRote.rote FROM  systemuser\n" +
            "LEFT JOIN SystemUserRote ON SystemUserRote.userId = systemuser.id\n" +
            "LEFT JOIN systemRote ON systemRote.id = SystemUserRote.roteId\n" +
            "LEFT JOIN systenrotemeun ON systenrotemeun.roteId =systemRote.id\n" +
            "LEFT JOIN systemmeun  ON systenrotemeun.meunId = systemmeun.MeunId\n";
    /**
     * 用户角色信息
     */
     public static final String USERROTENAME=" systemuser.UserName,SystemUserRote.roteId,systemRote.rote FROM  systemuser\n" +
            "LEFT JOIN SystemUserRote ON SystemUserRote.userId = systemuser.id\n" +
            "LEFT JOIN systemRote   ON systemRote.id=SystemUserRote.roteId  \n";
    /**
     * 数据字典信息
     */
    public static final String MEUN =" MeunId,MenuName FROM systemmeun\n";

    public static final String USER ="  UserName,UserPwd FROM systemuser";

    public static final String ADMINUSER=" FROM systemuser";

    public static final String ADMINMEUN=" FROM systemmeun";

    public static final String ROTEMEUN ="SELECT systemrote.RoteName AS RoteName,systemmeun.MenuName AS MenuName  FROM systemrotemenu   \n" +
            "LEFT JOIN  systemmeun ON systemmeun.id = systemrotemenu.meunId\n" +
            "LEFT JOIN systemrote ON systemrote.id = systemrotemenu.roteId";

    public static final String USERFOLDERS=" from folders where userId";

    public static final String SHOPRECHARGES= " price,id,user,Tolal_balance,time,balanace,type,Odd_Numbers FROM shopRecharge  ";

    public static final String DESC = "order by id desc";

    public static final String SYSTEMUSERS="SELECT \n" +
            "  SystemUser.UserName,\n" +
            "  SystemUser.state,\n" +
            "  systemuserdetails.Balance,\n" +
            "  systemuserdetails.Day,\n" +
            "  systemuserdetails.Name,\n" +
            "  systemuserdetails.IDS,\n" +
            "  systemuserdetails.Email,\n" +
            "  systemuserdetails.IPone,\n" +
            "  systemuserdetails.Header,\n" +
            "  systemuserdetails.money \n" +
            "FROM\n" +
            "  SystemUser \n" +
            "  LEFT JOIN systemuserdetails \n" +
            "    ON systemuserdetails.UserId = systemuser.id \n" +
            "WHERE SystemUser.state = 1 ";

}
